#ifdef WIN32
#include "zluaobj.h"
#include   <windows.h>   
//#include   <string.h>   
//#include <shlwapi.h>
//#pragma comment(lib, "shlwapi.lib")

ZLuaEnvDelegateWin32::ZLuaEnvDelegateWin32()
{
	char pszResourcePath[MAX_PATH] = {0};
	WCHAR  wszPath[MAX_PATH];
	int nNum = WideCharToMultiByte(CP_ACP, 0, wszPath, 
		GetCurrentDirectoryW(sizeof(wszPath), wszPath), 
		pszResourcePath, MAX_PATH, NULL, NULL);
	pszResourcePath[nNum] = '\\';
	pszResourcePath[nNum+1] = '\0';
	m_path[ZLuaEnv::ZPATH_APP]=pszResourcePath;
	m_path[ZLuaEnv::ZPATH_DEFAULT]=m_path[ZLuaEnv::ZPATH_APP];
	m_path[ZLuaEnv::ZPATH_ROOT]=m_path[ZLuaEnv::ZPATH_APP];
	m_path[ZLuaEnv::ZPATH_MOD]=m_path[ZLuaEnv::ZPATH_APP];
	m_path[ZLuaEnv::ZPATH_DOC]=m_path[ZLuaEnv::ZPATH_APP]+"doc\\";
	m_path[ZLuaEnv::ZPATH_CACHE]=m_path[ZLuaEnv::ZPATH_APP]+"cache\\";
	m_path[ZLuaEnv::ZPATH_TMP]=m_path[ZLuaEnv::ZPATH_APP]+"tmp\\";
}

const zString& ZLuaEnvDelegateWin32::GetPath( ZLuaEnv::EPATH p )
{
	if (p<ZLuaEnv::ZPATH_DEFAULT || p >=ZLuaEnv::ZPATH_MAXNUM)
		p=ZLuaEnv::ZPATH_DEFAULT;
	return m_path[p];
}

int ZLuaEnvDelegateWin32::OnCreateLuaEnv( ZLuaEnv& le )
{
	ZLuaEnvDelegate::OnCreateLuaEnv(le);
	return 0;
}

#endif

